/*
 * @Author: TJN tjn@246@126.com
 * @Date: 2024-06-24 17:00:03
 * @LastEditors: TJN tjn@246@126.com
 * @LastEditTime: 2024-06-24 17:02:55
 * @FilePath: \hdcms-nest\src\helper.ts
 * @Description:
 *
 * Copyright (c) 2024 by ${git_name_email}, All Rights Reserved.
 */
import { BadRequestException } from '@nestjs/common';

export const validateFail = (filed: string, message: string) => {
  throw new BadRequestException({
    error: 'Bad Request',
    message: [
      {
        filed,
        message,
      },
    ],
    statusCode: 400,
  });
};
